<template>
	<view class="system-setting-container">
		<u-navbar title="系统设置" title-color="#333333" title-bold></u-navbar>
		<view class="">
			<view class="bgcf " v-for="(item,index) in list" :key="index" @click="itemClick(item)">
				<view class="df aic jcsb pb30 pt30 ml30 mr30">
					<text class="c6 fs24">{{item.name}}</text>
					<nmr-icon name="xiangyou1" size="24" color="#666"></nmr-icon>
				</view>
				<u-line color="#e5e5e5" />
			</view>
			<view class=" p30">
				<u-button style="width: 702rpx;" type="success" shape="circle" :custom-style="customStyle"
					@click.stop="outLogin">退出登录</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				customStyle: {
					background: 'linear-gradient(90deg, #48A147 0%, #8AE38A 100%)',
					borderColor: '#33B775',
				},
				list: [{
						name: "个人信息收集清单",
						type: 10,
						url: 'https://pay.zhaimei365.com/image/bShop/person/index.html'
					},
					{
						name: "第三方共享信息清单",
						type: 11,
						url: 'https://pay.zhaimei365.com/image/bShop/other/index.html'
					},
					{
						name: "绑定业务员",
						type: 12,
					},
				]
			}
		},
		methods: {
			outLogin() {
				uni.clearStorageSync()
				uni.clearStorageSync()
				uni.setStorageSync('CARGOODLIST', [])
				uni.setStorageSync('showMask', true)
				
				uni.removeTabBarBadge({
					index: 3
				})
					this.$u.vuex('TOKEN','')
					this.$u.vuex('USERINFO', null)
				uni.reLaunch({
					url: '/pages/index/index'
				})
			},
			itemClick(item) {
				switch (item.type) {
					case 10:
						uni.navigateTo({
							url: '/pages/my/set/webViewH5?name=个人信息收集清单&&url=' + item.url
						})
						break;

					case 11:
						uni.navigateTo({
							url: '/pages/my/set/webViewH5?name=第三方共享信息清单&&url=' + item.url
						})
						break;
					case 12:
						uni.navigateTo({
							url: '/pages/my/set/bindSaleUseType'
						})
						break;
				}
			},

		}
	}
</script>

<style scoped lang="scss">
	.system-setting-container {
		background-color: #fff;

		.slot-content {
			text-align: center;
			padding-top: 50rpx;

			.title {
				font-size: 32rpx;
				font-weight: bold;
			}

			.desc {
				font-size: 26rpx;
			}
		}
	}
</style>